pub fn odd_fibnacci_sum(threshold: u32) -> u32 {
    if threshold == 0 {
        return 0;
    }
    if threshold == 1{
        return 2;
    }
    let mut sum = 0;
    let mut a = 0;
    let mut b = 1;
    for _ in 0..=threshold{
        if b > threshold{
            break;
        }
        if b%2==1{
            sum+=b;
        }
        let temp = a;
        a = b;
        b = temp + b;
    }
    sum
}
